package com.rp.android_gateway.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 网关
 * </p>
 *
 * @author vicente
 * @since 2021-11-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Gateway对象", description="网关")
public class Gateway extends Model<Gateway> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "SN")
    private String sn;

    @ApiModelProperty(value = "IMEI")
    private String imei;

    @ApiModelProperty(value = "物联网卡编号")
    private String phoneCard;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "状态")
    private Integer status;

    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "坐标")
    private String longitude;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "删除状态（0，正常，1已删除）")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建日期")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "更新日期")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "部门编码")
    private String orgCode;

    @ApiModelProperty(value = "拓展(自定义字段 json格式)")
    private String expand;

    @ApiModelProperty(value = "备用1")
    private String spare1;

    @ApiModelProperty(value = "备用2")
    private String spare2;

    @ApiModelProperty(value = "备用3")
    private String spare3;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
